package cn.itcast.feign.clients;

import cn.itcast.feign.fallback.UserClientFallBackFactory;
import cn.itcast.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 所有的用户服务请求，通过这里来进行调用
 */
@FeignClient("userservice")
public interface UserClient{
    @GetMapping("/user/{id}")
    public User findById(@PathVariable("id") Long id);
}